home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Systemmonitors / Snoopy / Offsets / devicesupport < prev    next >
Text File  |  1996-09-26  |  7KB  |  285 lines

  1. ; this is an includefile that helps you when snooping into devices. It
  2. ; contains all structures and offsets required to handle most common devices
  3.  
  4. ; $VER: offsets/devicesupport 1.1
  5.  
  6. * List Node Structure.  Each member in a list starts with a Node
  7. STRUCTURE=LN,0        ; List Node
  8. APTR=LN_SUCC        ; Pointer to next (successor)
  9. APTR=LN_PRED        ; Pointer to previous (predecessor)
  10. UBYTE=LN_TYPE
  11. BYTE=LN_PRI        ; Priority, for sorting
  12. APTR=LN_NAME        ; ID string, null terminated
  13. LABEL=LN_SIZE        ; Note: word aligned
  14.  
  15. * Message Structure
  16. ;STRUCTURE=MN,$<LN_SIZE>
  17. APTR=MN_REPLYPORT    ; message reply port
  18. UWORD=MN_LENGTH        ; total message length in bytes
  19.             ; (include MN_SIZE in the length)
  20. LABEL=MN_SIZE
  21.  
  22. ;------ Required portion of IO request:
  23. ;STRUCTURE=IO,$<MN_SIZE>
  24. APTR=IO_DEVICE        ; device node pointer
  25. APTR=IO_UNIT        ; unit (driver private)
  26. UWORD=IO_COMMAND    ; device command
  27. UBYTE=IO_FLAGS        ; special flags
  28. BYTE=IO_ERROR        ; error or warning code
  29. LABEL=IO_SIZE
  30.  
  31. ;------ Standard IO request extension:
  32. ULONG=IO_ACTUAL        ; actual # of bytes transfered
  33. ULONG=IO_LENGTH        ; requested # of bytes transfered
  34. APTR=IO_DATA        ; pointer to data area
  35. ULONG=IO_OFFSET        ; offset for seeking devices
  36. LABEL=IOSTD_SIZE
  37.  
  38. ; default device commands
  39. define=CMD_INVALID,0
  40. define=CMD_RESET,1
  41. define=CMD_READ,2
  42. define=CMD_WRITE,3
  43. define=CMD_UPDATE,4
  44. define=CMD_CLEAR,5
  45. define=CMD_STOP,6
  46. define=CMD_START,7
  47. define=CMD_FLUSH,8
  48. define=CMD_NONSTD,9
  49.  
  50. ;-------------------------------------------------------------
  51. ; trackdisk device commands
  52. define=TD_MOTOR,9
  53. define=TD_SEEK,10
  54. define=TD_FORMAT,11
  55. define=TD_REMOVE,12
  56. define=TD_CHANGENUM,13
  57. define=TD_CHANGESTATE,14
  58. define=TD_PROTSTATUS,15
  59. define=TD_RAWREAD,16
  60. define=TD_RAWWRITE,17
  61. define=TD_GETDRIVETYPE,18
  62. define=TD_GETNUMTRACKS,19
  63. define=TD_ADDCHANGEINT,20
  64. define=TD_REMCHANGEINT,21
  65. define=TD_GETGEOMETRY,22
  66. define=TD_EJECT,23
  67. define=TD_LASTCOMM,24
  68.  
  69. ; extended trackdisk commands
  70. define=ETD_WRITE,$8003
  71. define=ETD_READ,$8002
  72. define=ETD_MOTOR,$8009
  73. define=ETD_SEEK,$800A
  74. define=ETD_FORMAT,$800B
  75. define=ETD_UPDATE,$8004
  76. define=ETD_CLEAR,$8005
  77. define=ETD_RAWREAD,$8010
  78. define=ETD_RAWWRITE,$8011
  79.  
  80. ; struct IoTdRequest
  81. define=IOTD_COUNT,48
  82. define=IOTD_SECLABEL,52
  83. define=IOTD_SIZE,56
  84.  
  85. ;-------------------------------------------------------------
  86. ; audio.device commands
  87. define=ADCMD_FREE,9
  88. define=ADCMD_SETPREC,10
  89. define=ADCMD_FINISH,11
  90. define=ADCMD_PERVOL,12
  91. define=ADCMD_LOCK,13
  92. define=ADCMD_WAITCYCLE,14
  93. define=ADCMD_ALLOCATE,32
  94.  
  95. ; struct IOAudio
  96. define=ioa_AllocKey,$20
  97. define=ioa_Data,$22
  98. define=ioa_Length,$26
  99. define=ioa_Period,$2A
  100. define=ioa_Volume,$2C
  101. define=ioa_Cycles,$2E
  102. define=ioa_WriteMsg,$30
  103. define=ioa_SIZEOF,$44
  104. ;-------------------------------------------------------------
  105. ; cd.device commands
  106. define=CD_RESET,1
  107. define=CD_READ,2
  108. define=CD_WRITE,3
  109. define=CD_UPDATE,4
  110. define=CD_CLEAR,5
  111. define=CD_STOP,6
  112. define=CD_START,7
  113. define=CD_FLUSH,8
  114. define=CD_MOTOR,9
  115. define=CD_SEEK,10
  116. define=CD_FORMAT,11
  117. define=CD_REMOVE,12
  118. define=CD_CHANGENUM,13
  119. define=CD_CHANGESTATE,14
  120. define=CD_PROTSTATUS,15
  121. define=CD_GETDRIVETYPE,18
  122. define=CD_GETNUMTRACKS,19
  123. define=CD_ADDCHANGEINT,20
  124. define=CD_REMCHANGEINT,21
  125. define=CD_GETGEOMETRY,22
  126. define=CD_EJECT,23
  127. define=CD_INFO,32
  128. define=CD_CONFIG,33
  129. define=CD_TOCMSF,34
  130. define=CD_TOCLSN,35
  131. define=CD_READXL,36
  132. define=CD_PLAYTRACK,37
  133. define=CD_PLAYMSF,38
  134. define=CD_PLAYLSN,39
  135. define=CD_PAUSE,40
  136. define=CD_SEARCH,41
  137. define=CD_QCODEMSF,42
  138. define=CD_QCODELSN,43
  139. define=CD_ATTENUATE,44
  140. define=CD_ADDFRAMEINT,45
  141. define=CD_REMFRAMEINT,46
  142.  
  143. ;-------------------------------------------------------------
  144. ; clipboard.device commands
  145. define=CBD_POST,9
  146. define=CBD_CURRENTREADID,10
  147. define=CBD_CURRENTWRITEID,11
  148. define=CBD_CHANGEHOOK,12
  149.  
  150. ; struct IOClipReq 
  151. define=IO_CLIPID,48
  152. define=iocr_SIZE,52
  153.  
  154. ;-------------------------------------------------------------
  155. ; console.device commands
  156. define=CD_ASKKEYMAP,9
  157. define=CD_SETKEYMAP,10
  158. define=CD_ASKDEFAULTKEYMAP,11
  159. define=CD_SETDEFAULTKEYMAP,12
  160.  
  161. ;-------------------------------------------------------------
  162. ; gameport.device commands
  163. define=GPD_READEVENT,9
  164. define=GPD_ASKCTYPE,10
  165. define=GPD_SETCTYPE,11
  166. define=GPD_ASKTRIGGER,12
  167. define=GPD_SETTRIGGER,13
  168.  
  169. ;-------------------------------------------------------------
  170. ; input.device commands
  171. define=IND_ADDHANDLER,9
  172. define=IND_REMHANDLER,10
  173. define=IND_WRITEEVENT,11
  174. define=IND_SETTHRESH,12
  175. define=IND_SETPERIOD,13
  176. define=IND_SETMPORT,14
  177. define=IND_SETMTYPE,15
  178. define=IND_SETMTRIG,16
  179.  
  180. ;-------------------------------------------------------------
  181. ; keyboard.device commands
  182. define=KBD_READEVENT,9
  183. define=KBD_READMATRIX,10
  184. define=KBD_ADDRESETHANDLER,11
  185. define=KBD_REMRESETHANDLER,12
  186. define=KBD_RESETHANDLERDONE,13
  187.  
  188. ;-------------------------------------------------------------
  189. ; narrator.device : Structure NDI (Header=IOSTD_SIZE)
  190. define=NDI_RATE,$30
  191. define=NDI_PITCH,$32
  192. define=NDI_MODE,$34
  193. define=NDI_SEX,$36
  194. define=NDI_CHMASKS,$38
  195. define=NDI_NUMMASKS,$3C
  196. define=NDI_VOLUME,$3E
  197. define=NDI_SAMPFREQ,$40
  198. define=NDI_MOUTHS,$42
  199. define=NDI_CHANMASK,$43
  200. define=NDI_NUMCHAN,$44
  201. define=NDI_FLAGS,$45
  202. define=NDI_F0ENTHUSIASM,$46
  203. define=NDI_F0PERTURB,$47
  204. define=NDI_F1ADJ,$48
  205. define=NDI_F2ADJ,$49
  206. define=NDI_F3ADJ,$4A
  207. define=NDI_A1ADJ,$4B
  208. define=NDI_A2ADJ,$4C
  209. define=NDI_A3ADJ,$4D
  210. define=NDI_ARTICULATE,$4E
  211. define=NDI_CENTRALIZE,$4F
  212. define=NDI_CENTPHON,$50
  213. define=NDI_AVBIAS,$54
  214. define=NDI_AFBIAS,$55
  215. define=NDI_PRIORITY,$56
  216. define=NDI_PAD1,$57
  217. define=NDI_SIZE,$58
  218.  
  219. ;-------------------------------------------------------------
  220. ; parallel.device : structure IOEXTPAR (Header=IOSTD_SIZE)
  221. ;Structure IOEXTPAR: (Header=IOSTD_SIZE)
  222. define=IO_PEXTFLAGS,$30
  223. define=IO_PARSTATUS,$34
  224. define=IO_PARFLAGS,$35
  225. define=IO_PTERMARRAY,$36
  226. define=IOEXTPar_SIZE,$3E
  227.  
  228. ;-------------------------------------------------------------
  229. ; printer.device : structure IOPrtCmdReq (Header=IO_SIZE)
  230. define=io_PrtCommand,$20
  231. define=io_Parm0,$22
  232. define=io_Parm1,$23
  233. define=io_Parm2,$24
  234. define=io_Parm3,$25
  235. define=iopcr_SIZEOF,$26
  236.  
  237. ; printer.device : structure IODRPReq (Header=IO_SIZE)
  238. define=io_RastPort,$20
  239. define=io_ColorMap,$24
  240. define=io_Modes,$28
  241. define=io_SrcX,$2C
  242. define=io_SrcY,$2E
  243. define=io_SrcWidth,$30
  244. define=io_SrcHeight,$32
  245. define=io_DestCols,$34
  246. define=io_DestRows,$38
  247. define=io_Special,$3C
  248. define=iodrpr_SIZEOF,$3E
  249.  
  250. ;-------------------------------------------------------------
  251. ; scsi.device commands
  252. define=HD_SCSICMD,28
  253.  
  254. ;-------------------------------------------------------------
  255. ; serial.device commands
  256. define=SDCMD_QUERY,9
  257. define=SDCMD_BREAK,10
  258. define=SDCMD_SETPARAMS,11
  259. define=SER_DEVFINISH,12
  260.  
  261. ; Structure IOEXTSER: (Header=IOSTD_SIZE)
  262. define=IO_CTLCHAR,$30
  263. define=IO_RBUFLEN,$34
  264. define=IO_EXTFLAGS,$38
  265. define=IO_BAUD,$3C
  266. define=IO_BRKTIME,$40
  267. define=IO_TERMARRAY,$44
  268. define=IO_READLEN,$4C
  269. define=IO_WRITELEN,$4D
  270. define=IO_STOPBITS,$4E
  271. define=IO_SERFLAGS,$4F
  272. define=IO_STATUS,$50
  273. define=IOEXTSER_SIZE,$52
  274.  
  275. ;-------------------------------------------------------------
  276. ; timer.device commands
  277. define=TR_ADDREQUEST,9
  278. define=TR_GETSYSTIME,10
  279. define=TR_SETSYSTIME,11
  280.  
  281. ;Structure TIMEREQUEST: (Header=IO_SIZE)
  282. define=IOTV_TIME,$20
  283. define=IOTV_SIZE,$28
  284.  
  285.